<div class="main row">
    <div class="catego-title">
        <a href="<?php echo $base_url; ?>rao-vat"><span>Rao vặt</span></a>
    </div>

    <section class="fck col-md-12">
        <h1><?php echo $aAdvDetails[0]->title; ?></h1>
        <div class="tool-bar">
            <span class="date">
                <?php
                $create_date = date('d/m/Y', strtotime($aAdvDetails[0]->create_date));
                echo 'Ngày đăng: ' . $create_date;
                ?>
            </span>
            <ul class="social-bar">
                <li>
                    <a target="_blank" class="wi-icon wi-icon-face" href="https://www.facebook.com/sharer.php?u=<?php echo $current_url; ?>" title="facebook"></a>
                </li>
                <li>
                    <a class="wi-icon wi-icon-tw" href="https://twitter.com/share" title="tw"></a>
                </li>
                <li>
                    <a target="_blank" class="wi-icon wi-icon-google" href="https://plus.google.com/share?url=<?php echo $current_url; ?>" title="google plus"></a>
                </li>
                <li>
                    <a target="_blank" class="wi-icon wi-icon-mail" href="mailto:?subject=Xem%20n%E1%BB%99i%20dung%20b%C3%A0i%20vi%E1%BA%BFt%20:<?php echo $current_url; ?>" title="mail"></a>
                </li>
            </ul>
        </div>      
    </section>

    <section class="fck col-md-12">
        <div class="fck">
            <p><?php echo $aAdvDetails[0]->desc; ?></p>
        </div>
        <div class="hlight2">
            <span class="author">
                <?php if ($aAdvDetails[0]->user_full_name != '') {
                echo 'Tên liên hệ: ' . $aAdvDetails[0]->user_full_name;
                } ?>
            </span>
        </div>
        <div class="hlight2">
            <span class="author">
                <?php if ($aAdvDetails[0]->user_full_name != '') {
                echo 'Điện thoại: ' . $aAdvDetails[0]->user_tel;
                } ?>
            </span>
        </div>        
    </section>
    
    <?php 
    if ($aAdvDetails[0]->img != null && $aAdvDetails[0]->img != '') {         
    ?>
    <div class="main2 row">
        <aside class="sidebar col-md-12 col-sm-12 col-xs-12 ">
            <div class="block-1 txt-green-1">
                <div class="slider-1">
                    <ul class="slides">
                    <?php
                    $i=0;
                    $arr_img = explode(';', $aAdvDetails[0]->img);
                    foreach ($arr_img as $img) {
                        if ($i == 0){
                        ?>
                        <li class="flex-active-slide" style="width: 100%; float: left; margin-right: -100%; position: relative; display: block; -webkit-transition: opacity 0.6s ease; transition: opacity 0.6s ease; opacity: 1; z-index: 2;">
                            <a href="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>" target="_blank">
                                <img src="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>" draggable="false"> </a>
                        </li>
                    <?php
                        }else{
                    ?>
                        <li class="" style="width: 100%; float: left; margin-right: -100%; position: relative; display: block; -webkit-transition: opacity 0.6s ease; transition: opacity 0.6s ease; opacity: 0; z-index: 1;">
                            <a href="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>" target="_blank">
                                <img src="<?php echo $img_url; ?>style/upimg_man/image/uploads/<?php echo $img; ?>" draggable="false"> </a>
                        </li>
                    <?php
                        }
                        $i++;
                    } 
                    ?>
                    </ul>
                    <ul class="flex-direction-nav">
                        <li><a class="flex-prev" href="#">Previous</a>
                        </li>
                        <li><a class="flex-next" href="#">Next</a>
                        </li>
                    </ul>
                </div>
            </div>    
        </aside>
    </div>
    <?php     
    } 
    ?>
    
    <section class="fck col-md-12">
        <div class="block-1">
            <h2>Tin khác</h2>
            <ul class="list-new list-noborder">
                <?php
                foreach ($aAdv_Others as $item):
                ?>
                    <li>
                        <a class="name" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title="<?php echo $item->title; ?>"><?php echo $item->title . " <span class='time-mobile'>(" . date("d/m/Y", strtotime($item->create_date)) . ")</span>"; ?></a>
                    </li>                
                <?php
                endforeach;
                ?>
            </ul>
        </div>
        
    </section>         
    
</div>

